home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Internet / FeedDemon / FeedDemonInstall.exe / {app} / Data / Styles / Blue Vista.fdxsl2 next >
Encoding:
Extensible Markup Language  |  2009-08-31  |  12.4 KB  |  355 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6.  
  7. <xsl:output method="html"
  8.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  10.  
  11. $INCLUDE(commonvar.inc)$
  12.  
  13. <fd:capabilities showExcerpts="true" toggleExcerpts="true" collapsePosts="false" itemGrouping="false" showBreadcrumbs="true" />
  14.  
  15. <xsl:key name="key-group" match="/newspaper/channel/item" use="groupId" />
  16. <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
  17.  
  18. <xsl:template match="newspaper">
  19.     <html>
  20.     <head>
  21.         <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
  22.         $INCLUDE(metatrans.inc)$
  23.         <style type="text/css">
  24.             $INCLUDE(commonstyles.css)$
  25.             
  26.             body { 
  27.                 font: $FONT-SIZE-NEWSPAPER$/1.5em "$FONT-NAME-NEWSPAPER$", Verdana, Arial, sans-serif;
  28.                 padding-bottom: 18px;
  29.                 color: black; 
  30.                 margin: 0;
  31.                 background-repeat: repeat;
  32.                 background-image: url("$IMAGEDIR$blue_bg.gif");
  33.                 background-color: #324671;
  34.                 /*background-image: url("$IMAGEDIR$bluevista_bg.jpg");
  35.                 background-color: #85B2ED;*/
  36.             }
  37.             #container { 
  38.                 margin: 25px;
  39.                 padding: 20px 38px;
  40.                 background-color: white;
  41.                 border: 1px solid #1B60B9;
  42.                 border-right-width: 2px;
  43.                 border-bottom-width: 2px;
  44.             }
  45.             
  46.             div#sidebar { 
  47.                 float: left;
  48.                 margin-left: -14px;
  49.                 margin-right: 16px;
  50.                 margin-top: -18px;
  51.                 margin-bottom: 0;
  52.                 width: 45%;
  53.                 background-color: #E5F1FF;
  54.                 border: 1px dotted #85B2ED;
  55.                 border-bottom: none;
  56.             }
  57.             div#sidebar div.fdnewsitem { padding: 18px 20px; margin: 0; }
  58.  
  59.             a { color: #526FB2; }
  60.             div.newsitemcontent a:visited { color: gray; }    
  61.             a:hover { color: #3C5386; text-decoration: underline; }
  62.             a.notcached {
  63.                 text-decoration: none ! important;
  64.                 border-bottom: 1px dotted red ! important;
  65.             }
  66.     
  67.             h1,h2,h3,h4,h5,h6 { font-size: 100%; font-weight: bold; font-style: italic;    }
  68.     
  69.             div#newspapertitle { 
  70.                 font-size: 20px;
  71.                 font-weight: bold;
  72.                 margin-top: 26px;
  73.                 margin-bottom: 30px;
  74.                 color: #324671;
  75.                 letter-spacing: 1px;
  76.             }
  77.             #newspapertitle img { margin-right: 6px; border: 0; }
  78.             div#newspapertitle a { text-decoration: none; }
  79.             div#newspapertitle a:hover { text-decoration: underline; }
  80.  
  81.             div#pageheader { width: 100%; margin-bottom: 10px; }
  82.             div#breadcrumbs { overflow: hidden; float: left; }
  83.  
  84.             div.fdnewsitem {
  85.                 margin-bottom: 18px;                
  86.                 padding: 2px 4px;
  87.                 border-bottom: 1px dotted #85B2ED;
  88.             }
  89.             div.newsitemtitle { 
  90.                 font-size: 106%;
  91.                 margin-bottom: 4px;
  92.                 <xsl:if test="$newspaper-type='newsitem'">
  93.                     margin-top: 30px;
  94.                 </xsl:if>
  95.             }
  96.             div.newsitemtitle a { text-decoration: none;}
  97.             div.newsitemtitle a:hover { text-decoration: underline; }
  98.             div.newsitemtitle img, div.newsitemheader img { border: none; }
  99.             div.newsitemheader img { margin: 0 1px; }
  100.  
  101.             div.postenclosure {
  102.                 margin-top: 4px;
  103.                 margin-bottom: 10px;
  104.                 font-size: smaller;
  105.             }
  106.             .postenclosurename { font-weight: bold; }
  107.  
  108.             img.imgread { margin-right: 4px; }
  109.             img.imgopennew { margin-left: 4px; }
  110.  
  111.             div.newsitemcontent {
  112.                 padding-bottom: 18px;
  113.                 overflow-x: hidden; /* cut off images that are too wide */
  114.             }
  115.             div.newsitemcontent img { border: none; margin: 2px 3px; }            
  116.             div.postactions { display: inline; }
  117.             div.newsitemheader { font-size: x-small; margin: 8px 0; color: #9B9B9B; }
  118.             div#noitems { 
  119.                 color: #9099AE; 
  120.                 margin-bottom: 12px;
  121.                 padding-bottom: 12px;
  122.             }
  123.  
  124.             span.sep { color: #ACA899; margin: 0 3px; }
  125.             
  126.             #pageheader { color: #9099AE; }
  127.             
  128.             .unread a { font-weight: bold; color: $COLOR-UNREAD$; }
  129.             .flagged a { color: $COLOR-FLAGGED$; }
  130.             .normal a { color: black; }
  131.                         
  132.             a.more { font-weight: bold; padding-left: 4px; text-decoration: none }
  133.             
  134.             a img.button { padding: 1px; }
  135.             a:hover img.button { border: 1px solid #A0B8D8; background-color: #D9E6F7; padding: 0; }
  136.             img.icon { border: none; }
  137.             
  138.             #thumbnails {
  139.                 color: #324671;
  140.                 font-weight: bold;
  141.                 margin-bottom: 30px;
  142.             }
  143.             #thumbnails_group {
  144.                 text-align: center;
  145.                 margin-top: 6px;
  146.                 padding: 8px;            
  147.                 border: 1px dotted #324671;
  148.                 /*background-image: url("$IMAGEDIR$blue_bg.gif");
  149.                 background-repeat: repeat-x;*/
  150.                 background-color: #324671;
  151.                 zoom: 100%; /* force filter */
  152.                 filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#324671,endColorStr=#92A5CF);
  153.             }
  154.             #thumbnails .collapsed { display: none; }
  155.             img.thumbnail {
  156.                 display: inline;            
  157.                 margin: 2px;
  158.                 border: 2px solid #DCE2EF;
  159.                 filter:progid:DXImageTransform.Microsoft.DropShadow(color=#324671, offX=3, offY=3);
  160.                 vertical-align: middle;
  161.             }
  162.             a:hover img.thumbnail { border-color: #FFA4A4; }
  163.             
  164.             .hidden { display: none; }
  165.             
  166.             img.fdpostimg {
  167.                 float: right;
  168.                 height: 64px;
  169.                 max-width: 80px; /* IE7 */
  170.                 margin-left: 10px;
  171.             }
  172.             a img.fdpostimg { border: 1px solid white; }
  173.             a:hover img.fdpostimg { border-color: #A0B8D8; }
  174.  
  175.             #fdfocusedpost { background-color: #FFFFD2; }}
  176.         
  177.         </style>
  178.     </head>
  179.     <body>
  180.         <xsl:variable name="folderId" select="@folderId"/>
  181.         
  182.         <div id="container">
  183.             <div id="pageheader">
  184.                 <!-- breadcrumbs -->
  185.                 <xsl:if test="breadCrumbs">
  186.                     <div id="breadcrumbs">
  187.                         <xsl:variable name="num-breadcrumbs" select="count(breadCrumbs/breadCrumb)"/>
  188.                         <xsl:for-each select="breadCrumbs/breadCrumb">
  189.                             <xsl:choose>
  190.                                 <xsl:when test="position()=last() and $num-breadcrumbs>1">
  191.                                     <xsl:value-of select="@title"/>
  192.                                 </xsl:when>
  193.                                 <xsl:otherwise>
  194.                                     <a href="{.}"><xsl:value-of select="@title"/></a>
  195.                                     <xsl:if test="$num-breadcrumbs>1"> \ </xsl:if>
  196.                                 </xsl:otherwise>
  197.                             </xsl:choose>
  198.                         </xsl:for-each>
  199.                     </div>
  200.                 </xsl:if>
  201.             </div>
  202.             
  203.             <xsl:if test="title and $newspaper-type!='newsitem'">
  204.                 <div id="newspapertitle">
  205.                     <!-- $.INCLUDE(headerimg.inc)$ -->
  206.                     <xsl:choose>
  207.                         <xsl:when test="(@feedId!='') and ($newspaper-type='channel') and (channel/link)">
  208.                             <a href="fdaction:?action=gotofeedlink&feedId={@feedId}">
  209.                                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  210.                             </a>
  211.                             <a href="fdaction:?action=gotofeedlink&newtab=1&feedId={@feedId}" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
  212.                                 <img class="imgopennew button" src="$IMAGEDIR$linknew.gif" align="top" />
  213.                             </a>                            
  214.                         </xsl:when>
  215.                         <xsl:otherwise>
  216.                             <xsl:value-of select="title" disable-output-escaping="yes"/>
  217.                         </xsl:otherwise>
  218.                     </xsl:choose>                    
  219.                 </div>
  220.             </xsl:if>        
  221.         
  222.             <!-- thumbnails -->
  223.             <xsl:variable name="nds_thumbnails" select="channel/item/thumbnail"/>
  224.             <xsl:if test="$nds_thumbnails">
  225.                 <div id="thumbnails">
  226.                     $LANG_CONST(S_NewsLblThumbnails)$
  227.                     <a href="fdaction:?action=togglecollapse&id=thumbnails">
  228.                         <img src="$IMAGEDIR$arrowdown.gif" class="button" id="thumbnails_img_expand" border="0" align="absmiddle" />
  229.                     </a>
  230.                     <div id="thumbnails_group">
  231.                         <xsl:for-each select="$nds_thumbnails">
  232.                             <xsl:variable name="thumbnail-url" select="@url"/>
  233.                             <xsl:variable name="thumbnail-title" select="../title"/>
  234.                             <xsl:variable name="thumbnail-link">fdaction:?action=gotopostlink&feedid=<xsl:value-of select="../@feedId"/>&postid=<xsl:value-of select="../@postId"/>&markpostread=1</xsl:variable>
  235.                             <xsl:variable name="thumbnail-height" select="@height"/>
  236.                             <xsl:variable name="thumbnail-width" select="@width"/>
  237.                             <a href="{$thumbnail-link}" title="{$thumbnail-title}">
  238.                                 <xsl:choose>
  239.                                     <xsl:when test="$thumbnail-height=0 or $thumbnail-width=0">
  240.                                         <img src="{$thumbnail-url}" class="thumbnail"/>
  241.                                     </xsl:when>
  242.                                     <xsl:otherwise>
  243.                                         <img src="{$thumbnail-url}" class="thumbnail" height="{$thumbnail-height}" width="{$thumbnail-width}" />
  244.                                     </xsl:otherwise>
  245.                                 </xsl:choose>
  246.                             </a>
  247.                         </xsl:for-each>
  248.                     </div>
  249.                 </div>
  250.             </xsl:if>
  251.         
  252.             <xsl:choose>
  253.                 <xsl:when test="$item-count=0">
  254.                     <div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div>
  255.                 </xsl:when>
  256.                 <!-- show some items in a sidebar div when enough exist (first page only) -->
  257.                 <xsl:when test="$item-count>3 and pageInfo/@pageNum <=1">
  258.                     <xsl:variable name="nds_items" select="channel/item"/>
  259.                     <xsl:variable name="sidebar-cnt" select="$item-count div 3"/>
  260.                     <div id="sidebar">
  261.                         <xsl:for-each select="$nds_items">
  262.                             <xsl:sort select="@sortIndex" data-type="number"/>
  263.                             <xsl:if test="@sortIndex<=$sidebar-cnt">
  264.                                 <xsl:apply-templates select="."/>
  265.                             </xsl:if>
  266.                         </xsl:for-each>
  267.                     </div>
  268.                     <xsl:for-each select="$nds_items">
  269.                         <xsl:sort select="@sortIndex" data-type="number"/>
  270.                         <xsl:if test="@sortIndex>$sidebar-cnt">
  271.                             <xsl:apply-templates select="."/>
  272.                         </xsl:if>
  273.                     </xsl:for-each>
  274.                 </xsl:when>
  275.                 <!-- show all items in same div -->
  276.                 <xsl:otherwise>
  277.                     <xsl:for-each select="channel/item">
  278.                         <xsl:sort select="@sortIndex" data-type="number"/>
  279.                         <xsl:apply-templates select="."/>
  280.                     </xsl:for-each>                    
  281.                 </xsl:otherwise>
  282.             </xsl:choose>
  283.         </div>
  284.     </body>
  285.     </html>    
  286. </xsl:template>
  287.  
  288. <!-- news item template -->
  289. <xsl:template match="item">
  290.     <xsl:variable name="feedId" select="@feedId"/>
  291.     <xsl:variable name="postId" select="@postId"/>
  292.     <xsl:variable name="itemlink" select="link"/>
  293.  
  294.     <xsl:variable name="itemclass">
  295.         <xsl:choose>
  296.             <xsl:when test="state/@read=0 and state/@flagged!=0">unread flagged</xsl:when>
  297.             <xsl:when test="state/@read=0">unread</xsl:when>
  298.             <xsl:when test="state/@flagged!=0">flagged</xsl:when>
  299.             <xsl:otherwise>normal</xsl:otherwise>
  300.         </xsl:choose>
  301.     </xsl:variable>
  302.         
  303.     <xsl:variable name="show-this-excerpt" select="excerpt and $item-count>1"/>
  304.     <!-- must wrap in container so entire post can be hidden if deleted by user -->
  305.     <div id="{$postId}_container">
  306.         <div class="fdnewsitem" name="{$feedId}:{$postId}">
  307.             <div class="newsitemtitle {$itemclass}" id="{$postId}_title" >
  308.                 <a title="$LANG_CONST(S_NewsHintGotoPost)$" href="fdaction:?action=gotopostlink&feedid={$feedId}&postid={$postId}&markpostread=1">
  309.                       <xsl:value-of select="title" disable-output-escaping="yes"/>
  310.                 </a>
  311.                 <!-- goto post link in new tab -->
  312.                 <a href="fdaction:?action=gotopostlink&newtab=1&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
  313.                     <img class="imgopennew button" src="$IMAGEDIR$linknew.gif" align="absmiddle" />
  314.                 </a>        
  315.             </div>
  316.             <!-- display image for this post when excerpts are being shown -->
  317.             <xsl:if test="postImageUrl and $show-this-excerpt">
  318.                 <a id="{$postId}_fdpostimg" href="{postImageUrl}" title="{postImageUrl}">
  319.                     <img class="fdpostimg" src="{postImageUrl}"/>
  320.                 </a>
  321.             </xsl:if>
  322.             <div class="newsitemheader">
  323.                 $INCLUDE(postactions.inc)$
  324.                 <span class="sep">|</span><xsl:value-of select="dateDisplay"/>
  325.                 <xsl:if test="author"><span class="sep">|</span> <xsl:value-of select="author" disable-output-escaping="yes"/></xsl:if>
  326.                 <!-- source -->
  327.                 <xsl:if test="source and source/@htmlUrl">
  328.                     <xsl:variable name="srclink" select="source/@htmlUrl"/>
  329.                     <span class="sep">|</span> <a href="{$srclink}"><xsl:value-of select="source"/></a>
  330.                 </xsl:if>            
  331.             </div>
  332.             $INCLUDE(postenclosure.inc)$
  333.             <xsl:if test="description">            
  334.                 <div class="newsitemcontent">
  335.                     <xsl:choose>
  336.                         <xsl:when test="$show-this-excerpt">
  337.                             <a href="fdaction:?action=toggleexcerpt&postid={$postId}&feedid={$feedId}">
  338.                                 <img class="toggle" align="top" id="{$postId}_img_toggle_excerpt" src="$IMAGEDIR$plus.gif"/>
  339.                             </a>
  340.                             <!-- note that the full description is inserted dynamically by FeedDemon when the excerpt is expanded -->
  341.                             <span id="{$postId}_description" class="collapsed">
  342.                                 <xsl:value-of select="excerpt" disable-output-escaping="yes"/>
  343.                             </span>
  344.                         </xsl:when>
  345.                         <xsl:otherwise>
  346.                             <xsl:value-of select="description" disable-output-escaping="yes"/>
  347.                         </xsl:otherwise>
  348.                     </xsl:choose>
  349.                 </div>
  350.             </xsl:if>
  351.         </div>
  352.     </div>
  353. </xsl:template>
  354.  
  355. </xsl:stylesheet>